import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/', redirect: '/live' },
    { path: '/home', component: () => import('@/pages/HomeView.vue') },
    { path: '/live', component: () => import('@/pages/LiveView.vue') },
    { path: '/live/:id', component: () => import('@/pages/LiveRoomView.vue') },
    { path: '/chat/:id', component: () => import('@/pages/ChatRoomView.vue') },

    { path: '/login', component: () => import('@/pages/auth/LoginView.vue') },
    { path: '/register', component: () => import('@/pages/auth/RegisterView.vue') },

    { path: '/shop', component: () => import('@/pages/shop/ShopView.vue') },
    { path: '/me', component: () => import('@/pages/me/MeView.vue') },
  ],
})

export default router
